Class HCC.DT.HCC2HL72.EncCardQueRequst Extends Ens.DataTransformDTL [ DependsOn = (EnsLib.EDI.XML.Document, EnsLib.HL7.Message) ]
{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='EnsLib.EDI.XML.Document' targetClass='EnsLib.HL7.Message' sourceDocType='PRPA_IN201305UV02:PRPA_IN201305UV02' targetDocType='2.5.1:ADR_A19' create='new' language='objectscript' >
<assign value='source.{id().extension}' property='target.{MSH:MessageControlID}' action='set' />
<assign value='source.{creationTime().value}' property='target.{MSH:DateTimeOfMessage.Time}' action='set' />
<assign value='"ADR"' property='target.{MSH:MessageType.MessageCode}' action='set' />
<assign value='"A19"' property='target.{MSH:MessageType.TriggerEvent}' action='set' />
<assign value='source.{controlActProcess().queryByParameter.queryId().extension}' property='target.{QRD:QueryID}' action='set' />
<assign value='source.{controlActProcess().queryByParameter.initialQuantity.value}' property='target.{QRD:QuantityLimitedRequest.Quantity}' action='set' />
<assign value='source.{controlActProcess().queryByParameter.parameterList().id.extension}' property='target.{EVNgrp(1).PID:PatientID.IDNumber}' action='set' />
<assign value='source.{controlActProcess().queryByParameter.parameterList().livingSubjectAdministrativeGender().value().displayName.value}' property='target.{EVNgrp().PID:AdministrativeSex}' action='set' />
<assign value='source.{controlActProcess().queryByParameter.parameterList().livingSubjectName().value().item().part().value}' property='target.{EVNgrp().PID:PatientName(1)}' action='set' />
<assign value='source.{controlActProcess().queryByParameter.parameterList().livingSubjectId().value().item().extension}' property='target.{EVNgrp().PID:PatientIdentifierList(1).IDNumber}' action='set' />
<assign value='##class(HCC.Utils.Functions).GetDataByXPath(source.{controlActProcess().queryByParameter.matchCriterionList.minimumDegreeMatch.value()})' property='target.{QRD:QueryResultsLevel}' action='set' />
</transform>
}

}
